import { createApp } from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/assets/css/global.css'
// 引入element-plus的中文资源包
import locale from 'element-plus/es/locale/lang/zh-cn'
// 引入axios
import axios from 'axios'
// 设置请求的基础路径，今后要请求服务器某资源时，只需要写/XXX即可
axios.defaults.baseURL='http://localhost:8989'

const app = createApp(App)
// 把axios挂载到vue实例上，今后使用时，通过this.$http就能拿到axios实例
app.use(router).use(store).use(ElementPlus,{locale}).mount('#app')
app.config.globalProperties.$http=axios
